﻿using System;
using LoadTestDbToXml.Properties;

namespace LoadTestDbToXml
{
    class Program
    {
        static void Main(string[] args)
        {
            string connectionString;
            if (args.Length > 0)
            {
                connectionString = args[0];
            }
            else
            {
                connectionString = Settings.Default.LoadTest2010ConnectionString;
            }

            const string xmlDefaultFileName = "LoadTestSummary.xml";
            string xmlFileName;
            if (args.Length > 1)
            {
                xmlFileName = args[1];
            }
            else
            {
                xmlFileName = xmlDefaultFileName;
            }


            try
            {
                ApplicationRunner.Run(connectionString, xmlFileName);
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
    }
}
